home *** CD-ROM | disk | FTP | other *** search
/ Programmers Heaven 2 / Programmers Heaven 2.iso / files / windows / ocx / picbtn.exe / PICBTNS2.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-09-08  |  5.9 KB  |  190 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H00C0C0C0&
  5.    BorderStyle     =   3  'Fixed Dialog
  6.    Caption         =   "PicBtn Sample 2"
  7.    ClientHeight    =   1110
  8.    ClientLeft      =   1815
  9.    ClientTop       =   2145
  10.    ClientWidth     =   2910
  11.    BeginProperty Font 
  12.       name            =   "MS Sans Serif"
  13.       charset         =   1
  14.       weight          =   700
  15.       size            =   8.25
  16.       underline       =   0   'False
  17.       italic          =   0   'False
  18.       strikethrough   =   0   'False
  19.    EndProperty
  20.    ForeColor       =   &H80000008&
  21.    Height          =   1515
  22.    Left            =   1755
  23.    LinkTopic       =   "Form1"
  24.    MaxButton       =   0   'False
  25.    MinButton       =   0   'False
  26.    ScaleHeight     =   1110
  27.    ScaleWidth      =   2910
  28.    Top             =   1800
  29.    Width           =   3030
  30.    Begin PicbtnLib.PicBtn Justify 
  31.       Height          =   615
  32.       Index           =   3
  33.       Left            =   2040
  34.       TabIndex        =   3
  35.       Top             =   240
  36.       Width           =   615
  37.       _version        =   65538
  38.       _extentx        =   1085
  39.       _extenty        =   1085
  40.       _stockprops     =   79
  41.       caption         =   "Justify"
  42.       BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  43.          name            =   "MS Sans Serif"
  44.          charset         =   1
  45.          weight          =   400
  46.          size            =   8.25
  47.          underline       =   0   'False
  48.          italic          =   0   'False
  49.          strikethrough   =   0   'False
  50.       EndProperty
  51.       autosize        =   0   'False
  52.       buttoncolor     =   -2147483633
  53.       gap             =   2
  54.       mode            =   2
  55.       pictureup       =   "PICBTNS2.frx":0000
  56.       placement       =   1
  57.       mousefocus      =   -1  'True
  58.       value           =   0   'False
  59.       font3d          =   0
  60.       appearance      =   1
  61.    End
  62.    Begin PicbtnLib.PicBtn Justify 
  63.       Height          =   615
  64.       Index           =   2
  65.       Left            =   1440
  66.       TabIndex        =   2
  67.       Top             =   240
  68.       Width           =   615
  69.       _version        =   65538
  70.       _extentx        =   1085
  71.       _extenty        =   1085
  72.       _stockprops     =   79
  73.       caption         =   "Center"
  74.       BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  75.          name            =   "MS Sans Serif"
  76.          charset         =   1
  77.          weight          =   400
  78.          size            =   8.25
  79.          underline       =   0   'False
  80.          italic          =   0   'False
  81.          strikethrough   =   0   'False
  82.       EndProperty
  83.       autosize        =   0   'False
  84.       buttoncolor     =   -2147483633
  85.       gap             =   2
  86.       mode            =   2
  87.       pictureup       =   "PICBTNS2.frx":00EA
  88.       placement       =   1
  89.       mousefocus      =   -1  'True
  90.       value           =   0   'False
  91.       font3d          =   0
  92.       appearance      =   1
  93.    End
  94.    Begin PicbtnLib.PicBtn Justify 
  95.       Height          =   615
  96.       Index           =   1
  97.       Left            =   840
  98.       TabIndex        =   1
  99.       Top             =   240
  100.       Width           =   615
  101.       _version        =   65538
  102.       _extentx        =   1085
  103.       _extenty        =   1085
  104.       _stockprops     =   79
  105.       caption         =   "Right"
  106.       BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  107.          name            =   "MS Sans Serif"
  108.          charset         =   1
  109.          weight          =   400
  110.          size            =   8.25
  111.          underline       =   0   'False
  112.          italic          =   0   'False
  113.          strikethrough   =   0   'False
  114.       EndProperty
  115.       autosize        =   0   'False
  116.       buttoncolor     =   -2147483633
  117.       gap             =   2
  118.       mode            =   2
  119.       pictureup       =   "PICBTNS2.frx":01D4
  120.       placement       =   1
  121.       mousefocus      =   -1  'True
  122.       value           =   0   'False
  123.       font3d          =   0
  124.       appearance      =   1
  125.    End
  126.    Begin PicbtnLib.PicBtn Justify 
  127.       Height          =   615
  128.       Index           =   0
  129.       Left            =   240
  130.       TabIndex        =   0
  131.       Top             =   240
  132.       Width           =   615
  133.       _version        =   65538
  134.       _extentx        =   1085
  135.       _extenty        =   1085
  136.       _stockprops     =   79
  137.       caption         =   "Left"
  138.       BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  139.          name            =   "MS Sans Serif"
  140.          charset         =   1
  141.          weight          =   400
  142.          size            =   8.25
  143.          underline       =   0   'False
  144.          italic          =   0   'False
  145.          strikethrough   =   0   'False
  146.       EndProperty
  147.       autosize        =   0   'False
  148.       buttoncolor     =   -2147483633
  149.       gap             =   2
  150.       mode            =   2
  151.       pictureup       =   "PICBTNS2.frx":02BE
  152.       placement       =   1
  153.       mousefocus      =   -1  'True
  154.       value           =   0   'False
  155.       font3d          =   0
  156.       appearance      =   1
  157.    End
  158. Attribute VB_Name = "Form1"
  159. Attribute VB_Creatable = False
  160. Attribute VB_Exposed = False
  161. Option Explicit
  162. Private Sub Form_Load()
  163.     Justify(0).Value = True ' starts down
  164. End Sub
  165. Private Sub Justify_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  166.     Dim I As Integer
  167.     '
  168.     ' if this isn't the left mouse button, get out
  169.     '
  170.     If (Button <> 1) Then
  171.         Exit Sub
  172.     End If
  173.     '
  174.     ' cycle through all buttons
  175.     '
  176.     For I = 0 To 3
  177.         If I = Index Then
  178.             '
  179.             ' lower the button that was pressed
  180.             '
  181.             Justify(I).Value = True
  182.         Else
  183.             '
  184.             ' raise the buttons that weren't
  185.             '
  186.             Justify(I).Value = False
  187.         End If
  188.     Next I
  189. End Sub
  190.